import Vue from 'vue'
import VueRouter from 'vue-router'
import Links from '../components/links'
import IForm from '../views/form.vue'
import TableRender from '../views/table-render.vue'
import TableSlot from '../views/table-slot.vue'
import Tree from '../views/tree.vue'
import Niubitree from '../views/niubitree.vue'
import Model from '../views/model.vue'


Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        name: '首页',
        component: Links
    },
    {
        path: '/form',
        name: 'iForm',
        component: IForm
    },
    {
        path: '/table-render',
        name: 'tableRender',
        component: TableRender
    },
    {
        path: '/table-slot',
        name: 'TableSlot',
        component: TableSlot
    },
    {
        path: '/tree',
        name: 'Tree',
        component: Tree
    },
    {
        path: '/niubitree',
        name: 'Niubitree',
        component: Niubitree
    },
    {
        path: '/model',
        name: 'Model',
        component: Model
    }
]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router
